using CfgTable;
using IQIGame.Onigao.Framework;
using IQIGame.Onigao.Game;
using System.Collections.Generic;

namespace IQIGame.Onigao.GamePlay
{
    public class UD_ConfirmItem : UD_Confirm
    {
        public List<int> costItemCidNums;

        public static UD_ConfirmItem Create(CfgNotice cfgNotice, string finelDesc, List<int> costItemCidNums, System.Action callConfirm, System.Action callCancel, System.Action callClose)
        {
            var d = ClassPool<UD_ConfirmItem>.Get();
            d.cfgNotice = cfgNotice;
            d.finalDesc = finelDesc;
            d.costItemCidNums = costItemCidNums;
            d.callBtnConfirm = callConfirm;
            d.callBtnCancel = callCancel;
            d.callBtnClose = callClose;
            return d;
        }

        public override void OnReset()
        {
            base.OnReset();
            ListPool<int>.Put(costItemCidNums);
            costItemCidNums = null;
        }
    }
}
